package com.dalin.platform.loa.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

import com.dalin.common.base.BaseObject;
/*****************************************************************************
 * @content: 类信息                                                                                                                                *
 * @author : 那建林                                                                                                                                 *
 * @crtDate: 2010-09-28 14:04:16                                            *
 * @modDate: 2010-09-28 14:04:16                                            *
 * @version: 1.00                                                           *
 ****************************************************************************/
@Entity
@Table(name="LOA_ROLE_RDL")
public class LoaRoleRdlEntity extends BaseObject{
    private Long rrId; // RR_ID,16,0,null
    private Integer dl; // DL,8,0,null





    @Id
    @Column(name="RR_ID")
    @GeneratedValue(strategy = GenerationType.TABLE,generator="generator_normal")
    @TableGenerator(
        name = "generator_normal",
        table = "GLB_GENERATOR_KEY",
        pkColumnName = "GEN_KEY",
        valueColumnName = "GEN_VALUE",
        pkColumnValue = "LOA_ROLE_RDL",
        allocationSize=1
    )
    public Long getRrId() {
        return rrId;
    }

    public void setRrId(Long rrId) {
        this.rrId = rrId;
    }

    @Column(name="DL")
    public Integer getDl() {
        return dl;
    }

    public void setDl(Integer dl) {
        this.dl = dl;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof LoaRoleRdlEntity)) return false;
        final LoaRoleRdlEntity other = (LoaRoleRdlEntity) o;
        if (rrId == null) {
            if (other.rrId != null) return false;
        } else if (!rrId.equals(other.rrId)) {
            return false;
        }
        if (dl == null) {
            if (other.dl != null) return false;
        } else if (!dl.equals(other.dl)) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int njlrst = 17;
        njlrst = 31 * njlrst + (rrId == null ? 0 : rrId.hashCode());
        njlrst = 31 * njlrst + (dl == null ? 0 : dl.hashCode());
        return njlrst;
    }

}

